// JavaScript Document
function download(id){
	 $.getJSON('public.php?s=doc/getDocPathAjax/id/'+id,
		   function(data){
			   if(data.path=='' || data.paht=='undefined'){
				   alert(该文档不存在);
			   }else{
				   window.open(data.path,'_self');
			   }
			  // document.write('public.php?s=doc/getDocPathAjax/id/'+id);
		   });
	 
}
$(document).ready(function(){
$('#grade').rater(null,{maxvalue:5,curvalue:3},	function(el,value) {
     var id=$('#vote_id').val();
	 $.getJSON('public.php?s=doc/getGradeAjax/id/'+id+'/grade/'+value,function(data){
		if(data.result='ok')alert('成功给该文档评分'+value+'分，\r\n---感谢您的支持!---');
	 });
	 })
});